package com.jic.market.enums;


public enum LotteryResultCodeDict {
	
	ILLEGAL_PARAM("101","参数非法"),
	QUERY_DRAW_RECORD_FALI("102","查询中奖记录信息异常"),
	UPDATE_DRAW_RECORD_FALI("103","更新中奖记录信息异常"),
	
	QUERY_LOTTERY_REVICE_ADDRESS_ERROR("104","请检查领奖地址信息"),
	
	INSERT_LOTTERY_RECEIVE_ERROR("105","新增领奖地址信息异常"),
	QUERY_LOTTERY_REVICED_INFO("106","当前奖品已被领取"),
	QUERY_LOTTERY_REVICE_INFO_EXPIRE("107","当前奖品已过期"),
	
	QUERY_THEME_INFO_ERROR("108","查询抽奖活动信息异常"),
	
	
	QUERY_AWARD_INFO_ERROR("109","查询抽奖奖品信息异常"),
	
	LOTTERY_THEME_NOT_FOUND("110", "查不到该抽奖活动"),

	LOTTERY_USER_INTEGRAL_ERROR("111", "用户积分获取失败"),
	
	LOTTERY_DRAW_LIMIT_LOCK_ERROR("PROM_112", "获取抽奖记录锁异常"),
	
	LOTTERY_DRAW_LIMIT_ERROR("PROM_113", "获取抽奖记录异常"),

	UCC_USER_QUERY_ERROR("114", "根据accssToken获取用户信息失败"),
	;

	private String code;
	private String msg;

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	private LotteryResultCodeDict(String code, String msg){
		this.code = code;
		this.msg = msg;
	}


	public static String getLotteryResultCodeDictMsgByCode(String code) {
		String msg = null;
		for (LotteryDrawResultCode enumVal : LotteryDrawResultCode.values()) {
			if (enumVal.getCode().equals(code)) {
				msg = enumVal.getMsg();
				break;
			}
		}
		return msg;
	}
}
